import {
  createSSRApp
} from "vue";
import App from "./App.vue";

// 全局页面组件
import page from './components/page/page';
// 全局变量
import Global from "./common/global";
// 全局方法
import Way from "./common/way";
// vuex
import store from './store';
// 路由
import initApp from "./router/index";
initApp();
export function createApp() {
  const app = createSSRApp(App);
  app.component(page);
  app.use(store);
  // 全局变量
  app.config.globalProperties.$global = Global
  // 全局方法
  app.config.globalProperties.$way = Way
  return {
    app,
  };
}
